home *** CD-ROM | disk | FTP | other *** search
- property movie_width : 208
- property movie_height : 302
-
- property QTlogo_filename : "qlogo.jpg"
- property QT_HREF : "http://www.apple.com/quicktime/"
- property QTlogo_offset : {0, 0}
-
- property HPlogo_filename : "hotpickslogo.jpg"
- property Hotpicks_HREF : "http://www.apple.com/quicktime/hotpicks/"
- property HPlogo_offset : {0, 160}
-
- property hotpick1_filename : "hotpick1.jpg"
- property hotpick1_offset : {19, 205}
-
- property HP1text_filename : "hotpick1_text.txt"
- property HP1text_width : 170
- property HP1text_height : 43
- property HP1text_position : {19, 259}
- property HP1HREF_filename : "hotpick1_href.txt"
-
- try
- display dialog "Hotpick Builder" & return & return & ¬
- "This script demonstrates how movies can be auto-generated by building a movie from elements located in the same folder as this script."
-
- set this_app to the path to me
- set AppleScript's text item delimiters to ":"
- set the source_folder to ((text items 1 thru -2 of (this_app as string)) as string) & ":"
- set AppleScript's text item delimiters to ""
-
- try
- set QTLogo to alias ((source_folder & QTlogo_filename) as string)
- set HP_logo to alias ((source_folder & HPlogo_filename) as string)
- set Hotpick1_image to alias ((source_folder & hotpick1_filename) as string)
- set Hotpick1_textfile to alias ((source_folder & HP1text_filename) as string)
- set Hotpick1_hreffile to alias ((source_folder & HP1HREF_filename) as string)
- on error
- error "The required images must be in the same folder as this script."
- end try
-
- set hotpick1_text to read Hotpick1_textfile
- set hotpick1_HREF to read Hotpick1_hreffile
-
- tell application "QuickTime Player"
- launch -- bypass promo movie
- activate
-
- stop every movie
-
- make new movie
-
- set the full text of annotation "Full Name" of movie 1 to "Hotpicks Movie"
-
- -- CREATE THE BACKGROUND TRACK
- set this_track to make new track at movie 1 with data " "
- tell this_track
- set dimensions to {movie_width, movie_height}
- set the position to {0, 0}
- tell frame 1
- set background color to {65535, 65535, 65535}
- end tell
- set the name to "Background"
- end tell
-
- -- CREATE THE QT LOGO TRACK
- set this_track to make new track at movie 1 with data QTLogo
- tell this_track
- set the position to QTlogo_offset
- set href to QT_HREF
- set the name to "QT logo"
- end tell
-
- -- CREATE THE HOTPICKS LOGO TRACK
- set this_track to make new track at movie 1 with data HP_logo
- tell this_track
- set the position to HPlogo_offset
- set href to Hotpicks_HREF
- set the name to "Hotpicks logo"
- end tell
-
- -- CREATE THE HOTPICKS IMAGE TRACK
- set this_track to make new track at movie 1 with data Hotpick1_image
- tell this_track
- set the position to hotpick1_offset
- set href to hotpick1_HREF
- set the name to "Hotpick 1"
- end tell
-
- -- CREATE THE HOTPICKS TEXT TRACK
- set this_track to make new track at movie 1 with data hotpick1_text
- tell this_track
- set the dimensions to {HP1text_width, HP1text_height}
- set position to HP1text_position
- tell frame 1
- set the dimensions to {HP1text_width, HP1text_height}
- set the background color to {65535, 65535, 65535}
- set the foreground color to {0, 0, 0}
- set the default font to "Geneva"
- set the default font size to 9
- set the justification to center
- end tell
- set the name to "Hotpick 1 Description"
- end tell
- end tell
- on error error_message number error_number
- if the error_number is not -128 then
- activate
- beep
- display dialog error_message buttons {"Cancel"} default button 1
- end if
- end try
-